My solution for automatically close a Dialog in qml by clicking outside the window was to change the modality of the window to non modal:
Dialog
{
id: myDialog
height: 300
width: 600
modality: Qt.NonModal
...
My window has a 1280x800 size and the dialog appears in the middle. Once its open i click outside and the Dialog closes by itself.